home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / pdcurs21 / nonport / wordchar.c < prev    next >
C/C++ Source or Header  |  1993-06-18  |  1KB  |  61 lines

  1. #define    CURSES_LIBRARY    1
  2. #include <curses.h>
  3.  
  4. #ifdef UNIX
  5. #define NOTLIB
  6. #include <defs.h>
  7. #include <term.h>
  8. #endif
  9. #undef    wordchar
  10.  
  11. #ifdef PDCDEBUG
  12. char *rcsid_wordchar = "$Header: C:\CURSES\nonport\RCS\wordchar.c 2.1 1993/06/18 20:22:01 MH Rel MH $";
  13. #endif
  14.  
  15.  
  16.  
  17.  
  18. /*man-start*********************************************************************
  19.  
  20.   wordchar()    - returns the users word delete char
  21.  
  22.   PDCurses Description:
  23.      This routine returns the user's current word delete char.
  24.  
  25.      At the present time, this is still a constant, but positions
  26.      the library to more fully support this in the future.
  27.  
  28.   PDCurses Errors:
  29.      The wordchar returns the user's current delete word character.
  30.      If none is specified, then Ctrl-U is returned.
  31.  
  32.   Portability:
  33.      PDCurses    char wordchar( void );
  34.      SysV Curses    
  35.      BSD Curses    
  36.  
  37. **man-end**********************************************************************/
  38.  
  39. char    wordchar(void)
  40. {
  41. #ifdef PDCDEBUG
  42.     if (trace_on) PDC_debug("wordchar() - called\n");
  43. #endif
  44.  
  45. #ifdef UNIX
  46. #ifdef USE_TERMIO
  47.     ioctl(_CUR_TERM.fd, TCGETA, &_CUR_TERM.prog_mode);
  48.     return(_CUR_TERM.prog_mode.c_cc[VWERASE]);
  49. #else
  50. #ifdef TIOCGLTC
  51.     ioctl(_CUR_TERM.fd, TIOCGLTC, &_CUR_TERM.prog_mode.bsd_new);
  52.     return(_CUR_TERM.prog_mode.bsd_new.t_werase);
  53. #else
  54.     return(0);
  55. #endif
  56. #endif
  57. #else
  58.     return (_DWCHAR);            /* word delete char */
  59. #endif
  60. }
  61.